package com.zyx.springmvcmsb.response.controller;

import com.zyx.springmvcmsb.response.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zyx
 * @since 2021/10/4 15:02
 *
 * 自定义类型转换器的时候一定要注意对应的属性值 跟方法中参数的值要对应起来
 */
@Controller
public class MyConvertController {
    @RequestMapping("/converter")
    public String testConverter(User user, Model model) {
        System.out.println(user);
        model.addAttribute("user", user);
        return "success";
    }
}
